import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { DragDropContextProvider } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import { ThemeProvider } from 'styled-components';
import { LocaleProvider } from 'antd';
import zhCN from 'antd/lib/locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
import createStore from '@/reducer/store';
import Page from './Page';
import { GlobalStyle } from './styled';

moment.locale('zh-cn');
// redux 注入操作
const store = createStore({});


ReactDOM.render(
    <Provider store={store}>
      <ThemeProvider theme={{}}>
        <LocaleProvider locale={zhCN}>
          <DragDropContextProvider backend={HTML5Backend}>
            <div>
              <GlobalStyle />
              <Page />
            </div>
          </DragDropContextProvider>
        </LocaleProvider>
      </ThemeProvider>
    </Provider>
  ,
  document.getElementById('root')
);